<!--{if $this->Amobile_status}--><!--{Atemplate tpl/header_mobile}--><!--{else}--><!--{Atemplate tpl/header}--><!--{/if}-->

<style>
.-body{text-align:center;}
.phone{margin:0 auto;width:100%;text-align:center;}
.phone table{max-width:360px;margin:0 auto;text-align:left;font-size:20px;}
.mobile .m{width:160px;color:blue;font-weight:bold;}
.mobile input{font-size:20px;}
</style>
<script>
var A_m = '';
jQuery(document).ready(function(){
	find();
	jQuery('input[name="m"]').bind('keyup',function(){
		var m = jQuery(this).val();
		if(m.length>=7){
			if(A_m!=m.substr(0,7)){
				find();
			}
		}else if(m.length<7){
			jQuery('.phone .info').text('');
		}
		A_m = m.substr(0,7);
	});
});
function find(){
	var mobile = jQuery('input[name="m"]').val();
	if(mobile.length<7){return false;}
	jQuery.ajax({
		url:'{$this->Aappr}phone-get',
		dataType:"jsonp",
		jsonp:"jsonpcall",
		data:{'m':mobile.substr(0,7)},
		success:function(data){}
	});
	return false;
}
function jsonpcall(data){
	if(data.status==1){
		for(var i in data){
			if(jQuery('.phone_'+i).length==1) jQuery('.phone_'+i).html(data[i]);
		}
	}else{
		alert(data.msg);
	}
}
</script>

<h3>手机号码归属地查询</h3>
<form method="get" onsubmit="find();return false;">
<div class="phone">
<table class="-table">
	<tr><td>手机号码：</td><td class="mobile"><input type="number" class="m" name="m" size="11" value="$_GET[m]"/><input type="submit" value="查询"/></td></tr>
	<tr><td>归属省份：</td><td class="phone_province info"></td></tr>
	<tr><td>归属城市：</td><td class="phone_city info"></td></tr>
	<tr><td>运 营 商：</td><td class="phone_type info"></td></tr>
</table>
<p><a href="$this->Amodr-api" target="-blank">手机号码归属地查询API</a></p>
</div>
</form>

<!--{Atemplate tpl/footer}-->